<h1>ประชาสัมพันธ์</h1>
<ul id="breadcrumb">
	<li>ประชาสัมพันธ์</li>			
</ul>
<div id="content">
	<div class="search">
		<form method="get">
		  <label>หัวข้อ</label> <input type="text" name="search" value="<?php echo (!empty($_GET['search']))?$_GET['search']:'' ?>" />
		  &nbsp;<input type="submit" value="<?php echo lang('search'); ?>" class="button" />
		</form>
	</div>
<table class="list">
	<tr>
		<th>หัวข้อ</th>
		<th width="160">โดย</th>
		<th width="200">แก้ไขล่าสุด</th>
		<th width="180"><a class="button" href="information/form"><span class="icon_text addnew"></span>เพิ่มรายการ</a></th>
	</tr>
	<?php if($result): ?>
	<? foreach($result as $key => $item): ?>
	<tr <?php echo cycle($key) ?>>
		<td><?php echo $item['title']?></td>
		<td class="center"><?php echo $item['user_firstname'].' '.$item['user_lastname']?></td>
		<td class="center"><?php echo ($item['updated'])?db_to_th(date('Y-m-d h:i:s',$item['updated']),TRUE):db_to_th(date('Y-m-d h:i:s',$item['created']),TRUE)?></td>
		<td class="center">
			<a class="button" href="information/form/<?php echo $item['id'] ?>"><span class="icon_text edit"></span>แก้ไข</a> 
			<a class="button" href="information/delete/<?php echo $item['id'] ?>" onclick="return confirm('<?php echo lang('confirm_delete')?>')" ><span class="icon_text cancel"></span>ลบ</a>
		</td>
	</tr>
	<? endforeach; ?>
	<?php else: ?>
	<tr>
		<td colspan="5" class="center">- ไม่มีข้อมูล -</td>
	</tr>
	<?php endif; ?>
</table>
</div>